package com.amarsoft.apot.config;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.AnnotationBeanNameGenerator;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: 修改Spring默认创建对象赋值beanName的方式，不再是首字母首单词小写，而是类的全路径名！！
 * @title: BeanNameConfig
 * @Author szh
 * @Date: 2021/12/23 13:43
 * @Version 1.0
 */
@Configuration
public class BeanNameConfig extends AnnotationBeanNameGenerator {

    @Override
    protected String buildDefaultBeanName(BeanDefinition definition) {

        return definition.getBeanClassName();
    }
}
